<!--{template admin/tpl/header}-->

<div class="mainarea">
<div class="maininner">


<!--{if empty($_GET['op'])}-->

	<form method="post" action="admincp.php?ac=newscat">
	<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
	<div class="bdrcontent">
		<div class="title"><h3>帮组分类,学习分类,新闻分类。</h3></div>
		<p></p>
		
		<div class="topactions"><a href="admincp.php?ac=newscat">浏览</a> | <a href="admincp.php?ac=newscat&op=add">添加</a></div>
		<table cellspacing="0" cellpadding="0" class="formtable">
		<tr>
			<th width="100">分类名称</th>
			<th>分类简介</th>
			<th width="80">显示顺序</th>
			<th width="80">操作</th>
		</tr>
		<tr><th colspan="4"><font color=red size=3>新闻分类</font></th></tr>
		<!--{loop $newslist $value}-->
		<tr>
			<th >$value[classname]</th>
			<td>$value[note]</td>
			<td><input type="text" name="displayorder[{$value[classid]}]" value="$value[displayorder]" size="5"></td>
			<td width="80">
			<a href="admincp.php?ac=newscat&op=edit&classid=$value[classid]">编辑</a> | 
			<a href="admincp.php?ac=newscat&op=delete&classid=$value[classid]" onclick="return confirm('确认删除？');">删除</a></td>
		</tr>
		<!--{/loop}-->
		<tr><th colspan="4"><font color=red size=3>帮组分类</font></th></tr>
		<!--{loop $helplist $value}-->
		<tr>
			<th>$value[classname]</th>
			<td>$value[note]</td>
			<td><input type="text" name="displayorder[{$value[classid]}]" value="$value[displayorder]" size="5"></td>
			<td width="80">
			<a href="admincp.php?ac=newscat&op=edit&classid=$value[classid]">编辑</a> | 
			<a href="admincp.php?ac=newscat&op=delete&classid=$value[classid]" onclick="return confirm('确认删除？');">删除</a></td>
		</tr>
		<!--{/loop}-->
		<tr><th colspan="4"><font color=red size=3>学习分类</font></th></tr>
		<!--{loop $studylist $value}-->
		<tr>
			<th>$value[classname]</th>
			<td>$value[note]</td>
			<td><input type="text" name="displayorder[{$value[classid]}]" value="$value[displayorder]" size="5"></td>
			<td width="80">
			<a href="admincp.php?ac=newscat&op=edit&classid=$value[classid]">编辑</a> | 
			<a href="admincp.php?ac=newscat&op=delete&classid=$value[classid]" onclick="return confirm('确认删除？');">删除</a></td>
		</tr>
		<!--{/loop}-->
		</table>
	</div>
	
	<div class="footactions">
		<input type="submit" name="ordersubmit" value="更新排序" class="submit">
	</div>
	
	</form>
	
<!--{else}-->
	
	<form method="post" action="admincp.php?ac=newscat">
	<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
	<input type="hidden" name="classid" value="$thevalue[classid]" />
	<div class="bdrcontent">
		<div class="title"><h3>帮组分类,学习分类,新闻分类。</h3></div>
		<p></p>
		<div class="topactions"><a href="admincp.php?ac=newscat">浏览</a> | <a href="admincp.php?ac=newscat&op=add">添加</a></div>
		
		<table cellspacing="0" cellpadding="0" class="formtable">
		<tr><th style="width:15em;">分类名称</th><td><input type="text" name="classname" value="$thevalue[classname]"></td></tr>
		<tr><th>分类类型</th><td>
			<select name="typeid">
			<option value="0" $formtypearr[0]>请选择</option>
			<option value="1" $formtypearr[1]>帮组分类</option>
			<option value="2" $formtypearr[2]>新闻分类</option>
			<option value="3" $formtypearr[3]>学习分类</option>
			</select>
		</td></tr>
		<tr><th>简单介绍</th><td><textarea name="note" cols="50" rows="5">$thevalue[note]</textarea></td></tr>
		<tr><th>显示顺序</th><td><input type="text" name="displayorder" value="$thevalue[displayorder]" size="5"></td></tr>
		</table>
	</div>
		
	<div class="footactions">
		<input type="submit" name="fieldsubmit" value="提交" class="submit">
	</div>
	
	</form>
<!--{/if}-->
</div>
</div>

<div class="side">
	<!--{template admin/tpl/side}-->
</div>

<!--{template admin/tpl/footer}-->